package red.cola.model.system;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import red.cola.model.base.BaseEntity;

import java.util.List;

/**
 * @Name: SysUser
 * @Author: Cola
 * @Time: 2023/3/5 13:23
 * @Description: SysUser 用户
 */

@Data
@ApiModel(description = "用户")
@TableName("sys_user")
public class SysUser extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "用户名")
    @TableField("username")
    private String username;

    @ApiModelProperty(value = "密码")
    @TableField("password")
    private String password;

    @ApiModelProperty(value = "姓名")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "手机")
    @TableField("phone")
    private String phone;

    @ApiModelProperty(value = "头像地址")
    @TableField("head_url")
    private String headUrl;

    @ApiModelProperty(value = "部门 ID")
    @TableField("dept_id")
    private Long deptId;

    @ApiModelProperty(value = "岗位 ID")
    @TableField("post_id")
    private Long postId;

    @ApiModelProperty(value = "描述")
    @TableField("description")
    private String description;

    @ApiModelProperty(value = "openId")
    @TableField("open_id")
    private String openId;

    @ApiModelProperty("状态 （0 停用 | 1 正常）")
    @TableField("status")
    private Integer status;

    @TableField(exist = false)
    private List<SysRole> roleList;
    @ApiModelProperty(value = "岗位 （表中不存在）")
    @TableField(exist = false)
    private String postName;
    @ApiModelProperty(value = "部门 （表中不存在）")
    @TableField(exist = false)
    private String deptName;
}

